23] Nebulae, By Steven Blackmore (Imagine 2.9 and higher)

While working on an image (Disaster!), I became frustrated with Imagine's Nebula texture. The texture creates a nice wispy, nebulous look, but is inadequate for creating realistic astronomic nebulae. So, I set out to discover a better way. After many hours of experimenting I was ready to give up when a sudden inspiration hit. I tried applying Pebbled to a fog object, then applied Ghost, and rendered. My jaw hit the floor.

So what do bump textures like Pebbled have to do with fog objects? The key to the resulting affect is Ghost. The Ghost texture was designed to fade a fog object at its edges. In order to determine what part of the object is facing the camera, and what parts of the object are its 'sides', the texture looks at the angle the ray from the camera makes with the surface normal. The surface normal is an imaginary line that is perpendicular to the surface of the face (triangle) being rendered. In other words, a line pointing directly out from the surface. If the angle between the camera ray and the normal direction is 0.0, the object is facing the camera. If the angle is 90 degrees, the face being shaded is currently on the side of the object, etc. When Ghost is applied to a fog object, as the angle between camera ray and normal increases, the fog length is adjusted according to the values set in Ghost's requestor. Coincidentally, bump textures do their magic by adjusting the surface normal of the point being shaded. When Pebbled is applied to an object, it alters the surface normal to give the illusion of bumps on the object. When Ghost is subsequently applied, it finds modified normal values, which alter where Ghost does its fog thinning.

Enter Detail editor:


[Contents] [Previous] [Next]
owl-bar
Pages made from the amigaguide version with the help of Mike's RDAG2HTML and the fabulous Dietmar's GoldED with the WWW extension v2.
[email Ernie]